package com.kuang.mapper;


import com.kuang.springcloud.pojo.Userinfo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserMapper {

//    @Select("select * from userinfo")
    List<Userinfo> findAll();

    //    @Select("select * from userinfo where username=#{username}")
    Userinfo getuserByUsername(String username);

    //    @Update("update userinfo set role=#{role},password=#{password},province=#{province},organization=#{organization},mail=#{mail},telephone=#{telephone},orgtel=#{orgtel},contacts=#{contacts},address=#{address},realname=#{realname}  where username=#{username}")
    public int updateWhole(Userinfo user);

    //添加钻孔波速测试记录表
//    @Insert("insert into userinfo(username,password,role,province,organization,mail,telephone,orgtel,contacts,address,realname) values(#{username},#{password},#{role},#{province},#{organization},#{mail},#{telephone},#{orgtel},#{contacts},#{address},#{realname})")
    public int adduser(Userinfo user);



}